package com.galaxy.device.domain.bo;

import com.galaxy.common.core.validate.AddGroup;
import com.galaxy.common.core.validate.EditGroup;
import com.galaxy.common.mybatis.core.domain.BaseEntity;
import com.galaxy.device.domain.DeviceStock;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;

import jakarta.validation.constraints.NotNull;

/**
 * 设备库存业务对象
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = DeviceStock.class, reverseConvertGenerate = false)
public class DeviceStockBo extends BaseEntity {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 设备ID
     */
    @NotNull(message = "设备ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long deviceId;

    /**
     * 通道ID
     */
    @NotNull(message = "通道ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long channelId;

    /**
     * 商品ID
     */
    @NotNull(message = "商品ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long productId;

    /**
     * 库存数量
     */
    @NotNull(message = "库存数量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer stockQuantity;

    /**
     * 最大库存量
     */
    @NotNull(message = "最大库存量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer maxQuantity;

    /**
     * 最小库存量
     */
    @NotNull(message = "最小库存量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer minQuantity;

    /**
     * 预警库存量
     */
    @NotNull(message = "预警库存量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer alertQuantity;

    /**
     * 状态(0:缺货,1:正常,2:超量)
     */
    private Integer status;
}
